
package Records.Main;

import Records.Database.updateLibrary;
import Records.UserInterface.UserInterfaceUI;
import Records.Email.EmailForm;
import Records.UserInterface.SplashClass;
import Records.UserInterface.LibraryTable;
import Records.UserInterface.Marquee;
import Records.Database.databaseSetup;
import Records.Database.DuplicateEntry;
import Records.Database.DBSQL;
import java.sql.SQLException;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

/**
 *
 * @author Alexander
 *
 */
public class RecordsMain {

    public static EmailForm dialog;
    public static DBSQL dba;
    private static UserInterfaceUI UI;
    public static updateLibrary update;
    public static LibraryTable Library;
    private static ArrayList filePathList;
    public static Marquee marqTest;

    public static void main(String args[]) throws ParseException, SQLException {
    //public static void start(){    
    System.out.println("RecordsMain.main()");
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {
            Logger.getLogger(SplashClass.class.getName()).log(Level.SEVERE, null, ex);
        }
        DuplicateEntry.setHm(new HashMap());

        UI = new UserInterfaceUI();
        dialog = new EmailForm(new javax.swing.JFrame(), true);
        filePathList = new ArrayList();
        Library = new LibraryTable();
        update = new updateLibrary();
        dba = new DBSQL();
        marqTest = new Marquee("No Current Song");

        databaseSetup.Setup();
    }

    /**
     * @return the filePathList
     */
    public static ArrayList getFilePathList() {
        System.out.println("RecordsMain.getFilePathList()");
        return filePathList;
    }

    /**
     * @param element
     */
    public static void addToFilePathList(String element) {
        System.out.println("RecordsMain.addToFilePathList(" + element + ")");
        filePathList.add(element);
    }

    /**
     * @param element
     */
    public static void clearFilePathList() {
        System.out.println("RecordsMain.addToFilePathList()");
        filePathList.clear();
    }

    /**
     * @return the UI
     */
    public static UserInterfaceUI getUI() {
        return UI;
    }
}
